package al.ui;

import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;

import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class Rechereche extends JPanel{
	JTextField t;
	JLabel l;
	JPanel content;
	GridBagConstraints gbc = new GridBagConstraints();  
	
	public Rechereche(String label, int size, String titre){
		this.setLayout(new FlowLayout(FlowLayout.CENTER));
		this.setBackground(Color.WHITE);
		this.setBorder(BorderFactory.createLineBorder(Color.GRAY));
		this.setBorder(BorderFactory.createTitledBorder(titre));
		//this.setSize(10,10);
		
		
		//gbc.gridx = gbc.gridy = 0;  
	    //gbc.gridwidth = gbc.gridheight = 1;  
	    //gbc.fill = GridBagConstraints.BOTH;  
	    //gbc.anchor = GridBagConstraints.NORTHWEST;  
	    //gbc.weightx = gbc.weighty = 10;  
		
				
		content = new JPanel();
		content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS));
		content.setBackground(Color.WHITE);
		
		l = new JLabel(label);
		t = new JTextField(size);
		
		content.add(l);
		content.add(t);
		
		this.add(content);
		
	}
}
